<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,maximum-scale=1.0" />
    <script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/??flexible_css.js,flexible.js"></script>
    <link rel="stylesheet" type="text/css" href="css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/public.js" type="text/javascript" charset="utf-8"></script>
    <title>扫码点餐—付款</title>
	<style>
		.order_txt{
			text-align: center;
			display: block;
			margin: 2.666rem auto 0.533rem;
			font-size: 14px;
		}
		.order_num{
			display: block;
			font-size: 14px;
			text-align: center;
		}
		.goBackMenu{
			width:1.866rem;
			height:1.866rem;
			background-image: linear-gradient(270deg, rgba(254, 66, 16, 0.9) 0%, rgba(253, 124, 16, 0.9) 100%),
			linear-gradient( rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9));
			background-blend-mode: normal,normal;
			opacity: 0.9;
			border-radius:50%;
			position: absolute;
			right: 0.266rem;
			text-align: center;
			padding-top: 0.266rem;
			box-sizing: border-box;
		}
		.goBackMenu .icon{
			display:block;
			width: 0.64rem;
			height: 0.64rem;
			background: url(images/menu_1.png)no-repeat center/100% 100%;
			margin-left: 0.666rem;
			margin-bottom: 0.133rem;
		}
		.float_con{
			width: 100%;
			height: 1.866rem;
			position: fixed;
			left: 0;
			bottom: 28px;
			color: #FFFFFF;
		}
		.float_con .txt{
			color: #FFFFFF;
		}
		.close_btn{
			width: 7.573rem;
    		height: 1.226rem;
    		line-height: 1.226rem;
    		text-align: center;
    		color: #FFFFFF;
    		border-radius: 0.613rem;
    		background-color: #fa8c0f;
    		border: solid 2px #fc7900;
    		box-sizing: border-box;
    		display: block;
    		margin: 1.066rem auto 0;
    		outline: none;
		}
	</style>
</head>
<body>
	<div id="success">
		<span class="order_txt">点菜成功！</span>
		<span class="order_num">点菜单号：<span class="order"></span></span>
		<a class="close_btn" href="javascript:void(0);" onclick="delCart()">立即关闭</a>
		<div class="float_con">
			<!--<div class="continue">
				<i class="icon"></i>
				<span class="txt">继续点餐</span>
			</div>-->
			<div class="goBackMenu">
				<i class="icon"></i>
				<span class="txt">返回菜单</span>
			</div>
		</div>
	</div>
    <input type="hidden" id="out_trade_no">
<script type="text/javascript">
 $(function () {
        (function ($) {
            $.getUrlParam = function (name) {
                var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r != null) return unescape(r[2]);
                return null;
            }
        })
        (jQuery);
        $(".znum").html($.getUrlParam('znum'));
        $(".pnum").html($.getUrlParam('pnum'));
        var out_trade_no=$.getUrlParam('out_trade_no');
        
        //清空购物车，并返回订单页面
        function delCart(){
        	$.ajax({
	        	url:url() + "index.php/Api/Car/del",
	        	dataType:"json",
	        	type:"get",
	        	success:function (data){
	        		console.log(data)
	        		window.location.href =  url() + "html/meal_new/order.html";
	        	}
	       })
        }
$(".order").html(out_trade_no);
        znum=$(".znum").html();
        pnum=$(".pnum").html();

    })
 	

</script>
</body>
</html>